package com.zhilianbao.leyaogo.model.response.Coupon;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by liu on 2016/11/28.
 */
public class CanUseCard implements Parcelable {

    /**
     * cardItemId : 0
     * supplierId : 0
     * cardId : 0
     * cardNo : string
     * cardSeq : string
     * cardPwd : string
     * beginDay : 2016-11-28T08:41:46.672Z
     * endDay : 2016-11-28T08:41:46.672Z
     * cardPrice : 0
     * cardBalance : 0
     * frozenBalance : 0
     * recordVersion : 2016-11-28T08:41:46.672Z
     * bindUserId : 0
     * bindDtm : 2016-11-28T08:41:46.672Z
     * comments : string
     */

    private long cardItemId;
    private long supplierId;
    private long cardId;
    private String cardNo;
    private String cardSeq;
    private String cardPwd;
    private String beginDay;
    private String endDay;
    private double cardPrice;//面额
    private double cardBalance;//余额
    private double frozenBalance;//冻结余额
    private String recordVersion;
    private long bindUserId;
    private String bindDtm;
    private String comments;

    private boolean isCheck;
    private int statusCode;
    private int cardItemType;
    private String orderNo;
    private int orderPayLimit;
    private long orderId;

    protected CanUseCard(Parcel in) {
        cardItemId = in.readLong();
        supplierId = in.readLong();
        cardId = in.readLong();
        cardNo = in.readString();
        cardSeq = in.readString();
        cardPwd = in.readString();
        beginDay = in.readString();
        endDay = in.readString();
        cardPrice = in.readDouble();
        cardBalance = in.readDouble();
        frozenBalance = in.readDouble();
        recordVersion = in.readString();
        bindUserId = in.readLong();
        bindDtm = in.readString();
        comments = in.readString();
        isCheck = in.readByte() != 0;
        statusCode = in.readInt();
        cardItemType = in.readInt();
        orderNo = in.readString();
        orderPayLimit = in.readInt();
        orderId = in.readLong();
    }

    public static final Creator<CanUseCard> CREATOR = new Creator<CanUseCard>() {
        @Override
        public CanUseCard createFromParcel(Parcel in) {
            return new CanUseCard(in);
        }

        @Override
        public CanUseCard[] newArray(int size) {
            return new CanUseCard[size];
        }
    };

    public long getCardItemId() {
        return cardItemId;
    }

    public void setCardItemId(long cardItemId) {
        this.cardItemId = cardItemId;
    }

    public long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(long supplierId) {
        this.supplierId = supplierId;
    }

    public long getCardId() {
        return cardId;
    }

    public void setCardId(long cardId) {
        this.cardId = cardId;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getCardSeq() {
        return cardSeq;
    }

    public void setCardSeq(String cardSeq) {
        this.cardSeq = cardSeq;
    }

    public String getCardPwd() {
        return cardPwd;
    }

    public void setCardPwd(String cardPwd) {
        this.cardPwd = cardPwd;
    }

    public String getBeginDay() {
        return beginDay;
    }

    public void setBeginDay(String beginDay) {
        this.beginDay = beginDay;
    }

    public String getEndDay() {
        return endDay;
    }

    public void setEndDay(String endDay) {
        this.endDay = endDay;
    }

    public double getCardPrice() {
        return cardPrice;
    }

    public void setCardPrice(double cardPrice) {
        this.cardPrice = cardPrice;
    }

    public double getCardBalance() {
        return cardBalance;
    }

    public void setCardBalance(double cardBalance) {
        this.cardBalance = cardBalance;
    }

    public double getFrozenBalance() {
        return frozenBalance;
    }

    public void setFrozenBalance(double frozenBalance) {
        this.frozenBalance = frozenBalance;
    }

    public String getRecordVersion() {
        return recordVersion;
    }

    public void setRecordVersion(String recordVersion) {
        this.recordVersion = recordVersion;
    }

    public long getBindUserId() {
        return bindUserId;
    }

    public void setBindUserId(long bindUserId) {
        this.bindUserId = bindUserId;
    }

    public String getBindDtm() {
        return bindDtm;
    }

    public void setBindDtm(String bindDtm) {
        this.bindDtm = bindDtm;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public boolean isCheck() {
        return isCheck;
    }

    public void setCheck(boolean check) {
        isCheck = check;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public int getCardItemType() {
        return cardItemType;
    }

    public void setCardItemType(int cardItemType) {
        this.cardItemType = cardItemType;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getOrderPayLimit() {
        return orderPayLimit;
    }

    public void setOrderPayLimit(int orderPayLimit) {
        this.orderPayLimit = orderPayLimit;
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(cardItemId);
        dest.writeLong(supplierId);
        dest.writeLong(cardId);
        dest.writeString(cardNo);
        dest.writeString(cardSeq);
        dest.writeString(cardPwd);
        dest.writeString(beginDay);
        dest.writeString(endDay);
        dest.writeDouble(cardPrice);
        dest.writeDouble(cardBalance);
        dest.writeDouble(frozenBalance);
        dest.writeString(recordVersion);
        dest.writeLong(bindUserId);
        dest.writeString(bindDtm);
        dest.writeString(comments);
        dest.writeByte((byte) (isCheck ? 1 : 0));
        dest.writeInt(statusCode);
        dest.writeInt(cardItemType);
        dest.writeString(orderNo);
        dest.writeInt(orderPayLimit);
        dest.writeLong(orderId);
    }
}
